<template>
  <div class="submit">
    <div class="box">
      <img class="succeed" src="../../assets/img/succeed.png" alt="">
      <div class="danhao">
        <p class="p1">感谢您在本店购物！</p>
        <p class="p2">您的订单已提交成功，请记住您的订单号</p>
        <p class="p3">{{ordernum}}</p>
      </div>
      <div class="shaohou">
        稍后会有配配送人员进行配送，请注意接听电话~
      </div>
      <div class="but">
        <div class="but1" @click="toorderdetail">查看订单</div>
        <div class="but2" @click="toindex">回到首页</div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        ordernum:"",
        order_id:""
      }
    },
    methods: {
      toindex(){
        this.$router.push({path:'/index'})
      },
      toorderdetail(){
      
        this.$router.push({path:'/order-details',query:{"order_id":this.order_id}})
  
      },
    },
    
    created () {
      // this.beforeurl=this.$route.params.beforeurl
      this.ordernum=this.$route.query.order_sn;
      this.order_id=this.$route.query.order_id
    },
  }
</script>

<style scoped>
.submit{
  width: 100%;
}
.box{
  width: 100%;
  margin-top: 74px;
  text-align: center;
}
.succeed{
  width:144px;
  height:86px;
}
.danhao{
  width:510px;
  height:124px;
  margin: auto;
  margin-top: 30px;
}
.danhao .p1{
  font-size:32px;
  font-family:PingFang SC;
  font-weight:500;
  color:rgba(0,0,0,1);
  line-height:48px;
}
.danhao .p2{
  font-size:28px;
  font-family:PingFang SC;
  font-weight:500;
  color:rgba(0,0,0,1);
  line-height:48px;
}
.danhao .p3{
  font-size:30px;
  font-family:PingFang SC;
  font-weight:500;
  color:#E22E2E;
  line-height:48px;
}
.shaohou{
  font-size:24px;
  font-family:Microsoft YaHei;
  font-weight:400;
  color:rgba(102,102,102,1);
  line-height:30px;
  margin-top: 49px;
}
.but{
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 100px;
}
.but1{
  width:268px;
  height:88px;
  border:1PX solid rgba(5,163,86,1);
  border-radius:44px;
  font-size:36px;
  font-family:PingFang SC;
  font-weight:bold;
  color:rgba(5,163,86,1);
  line-height: 88px;
  text-align: center;
}
.but2{
  width:268px;
  height:88px;
  background:rgba(5,163,86,1);
  border-radius:44px;
  font-size:36px;
  font-family:PingFang SC;
  font-weight:bold;
  color:rgba(255,255,255,1);
  line-height: 88px;
  text-align: center;
}
</style>